<?php

$this->widget('ext.yiiSortableModel.widgets.SortableCGridView', array(
    'id' => $identificador . '-grid',
    'type' => 'striped bordered hover advance',
    'orderField' => 'peso',
    'idField' => 'id',
    'orderUrl' => 'reordenar',
    'dataProvider' => $model,
    'columns' => array(
        array(
            'name' => 'nombre',
            'type' => 'html',
            'value' => '"<i class=\'icon-move\'></i> ".CHtml::link($data->nombre, Yii::app()->createUrl("/crm/grupo/view",array("id"=>$data->id,"identificador"=>"' . $identificador . '")))',
            'header' => 'Grupo',
        ),
        'descripcion',
        array(
            'class' => 'CButtonColumn',
            'template' => '{update} {delete}',
            'buttons' => array(
                'update' => array(
                    'label' => '<button class="btn btn-primary"><i class="icon-pencil"></i></button>',
                    'options' => array('title' => 'Actualizar'),
                    'imageUrl' => false,
                ),
                'delete' => array(
                    'label' => '<button class="btn btn-danger"><i class="icon-trash"></i></button>',
                    'options' => array('title' => 'Eliminar',),
                    'imageUrl' => false,
                ),
            ),
            'htmlOptions' => array(
                'width' => '80px'
            )
        ),
    ),
));
?>